home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / PrintDbl.3 < prev    next >
Encoding:
Text File  |  1994-12-17  |  1.5 KB  |  46 lines

  1. '\"
  2. '\" Copyright (c) 1989-1993 The Regents of the University of California.
  3. '\" Copyright (c) 1994 Sun Microsystems, Inc.
  4. '\"
  5. '\" See the file "license.terms" for information on usage and redistribution
  6. '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '\" 
  8. '\" @(#) PrintDbl.3 1.3 94/12/17 16:17:26
  9. '\" 
  10. .so man.macros
  11. .HS Tcl_PrintDouble tclc 7.0
  12. .BS
  13. .SH NAME
  14. Tcl_PrintDouble \- Convert floating value to string
  15. .SH SYNOPSIS
  16. .nf
  17. \fB#include <tcl.h>\fR
  18. .sp
  19. \fBTcl_PrintDouble\fR(\fIinterp, value, dst\fR)
  20. .SH ARGUMENTS
  21. .AS Tcl_Interp *interp
  22. .AP Tcl_Interp *interp in
  23. Interpreter that controls the conversion.
  24. .AP double value in
  25. Floating-point value to be converted.
  26. .AP char *dst out
  27. Where to store string representing \fIvalue\fR.  Must have at
  28. least TCL_DOUBLE_SPACE characters of storage.
  29. .BE
  30.  
  31. .SH DESCRIPTION
  32. .PP
  33. \fBTcl_PrintDouble\fR generates a string that represents the value
  34. of \fIvalue\fR and stores it in memory at the location given by
  35. \fIdst\fR.  It uses %g format to generate the string, with two
  36. special twists.  First, the string is guaranteed to contain either
  37. a ``.'' or an ``e'' so that it doesn't look like an integer (where
  38. %g would generate an integer with no decimal point, \fBTcl_PrintDouble\fR
  39. adds ``.0'').  Second, the number of significant digits printed at
  40. \fIdst\fR is controlled by the \fBtcl_precision\fR variable in
  41. \fIinterp\fR;  if \fBtcl_precision\fR is undefined then 6 significant
  42. digits are printed.
  43.  
  44. .SH KEYWORDS
  45. conversion, double-precision, floating-point, string
  46.